package cn.wwcyc.service;

import cn.wwcyc.domain.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author Administrator
* @description 针对表【user】的数据库操作Service
* @createDate 2023-07-01 12:08:41
*/
public interface UserService extends IService<User> {

    IPage<UserRoleMenuVo> getUserRoleMenuVoPage(IPage<UserRoleMenuVo> page);

//    User getCurrentUser();

    User getCurrentUser(HttpServletRequest request);

    IPage<UserRoleMenuVo> getUserRoleMenuVo(IPage<UserRoleMenuVo> page, String username, List<Long> dwIdList);

    Integer myUpdateById(User user);

    void saveWithRoles(UserVo user);

    void editWithRoles(UserVo user);

    void changePassword(Long userId, String oldpassword, String newpassword);

    void editWithRoles(UserDTO user);

    boolean checkSameUserName(String userName);

    boolean checkEditSameUserName(Long id, String userName);
}
